#include <iostream>
#include "Room.h"
#include "Building.h"
#include <string>
using namespace std;


void main3_1()
{
	Room room1;
	cout << room1.get_area() << room1.get_type() << endl;
	Room room2(50, "Kitchen");
	cout << room2.get_area() << room2.get_type() << endl;
	room1.set_area(300);
	cout << room1.get_area() << room1.get_type() << endl;
	room1.set_type("Living Room");
	cout << room1.get_area() << room1.get_type() << endl;
}
void main3_2()
{
	Room room(10, "Toilet");
	room.Write();
	room.Read();
	room.Write();
}
void main3_3()
{
	Room room(155, "Livingroom");
	cout << room;
	cout << "Area, name";
	cin >> room;
	cout << room;
}
void main3_4()
{
	Building building;
	building.Add(Room(1727, "Gameroom"));
	building.Add(Room(12, "WC"));
	building.Add(Room(30, "Kitchen"));
	building.Add(Room(40, "Scrub"));
	cout << building.list();
	cout << endl << endl;
	cout << "room to search for";
	string s;
	cin >> s;
	cout << building.search(s);
	cout << endl << endl;
	building.Delete(0);
	building.Delete(2);
	cout << building.list();
}
void main3_5_6()
{
	Building building;
	building.Add(Room(170, "Gameroom"));
	building.Add(Room(12, "WC"));
	building.Add(Room(10, "Kitchen"));
	building.Add(Room(14, "Scrub"));
	building.WriteToFile("Building");
	cout << building.list();
	cout << endl << endl;
	building = building.ReadFromFile("Building");
	cout << building.list();
}
void main3_7()
{
	Building building;
	building.Add(Room(50, "Gameroom"));
	building.Add(Room(25, "WC"));
	building.Add(Room(10, "Kitchen"));
	building.Add(Room(2, "Scrub"));
	cout << building.Area() << endl;
}

int main()
{
	main3_1();
	main3_2();
	main3_3();
	main3_4();
	main3_5_6();
	main3_7();
	system("PAUSE");
}